<!DOCTYPE html>
<html id="docs" lang="en" class="">
	<head>
	<meta charset="utf-8">
<title>Using Page Templates - Kubernetes</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" type="image/png" href="../../../../images/favicon.png">
<link rel="stylesheet" type="text/css" href="../../../../css/base_fonts.css">
<link rel="stylesheet" type="text/css" href="../../../../css/styles.css">
<link rel="stylesheet" type="text/css" href="https://code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css">
<link rel="stylesheet" type="text/css" href="../../../../css/callouts.css">
<link rel="stylesheet" type="text/css" href="../../../../css/custom-jekyll/tags.css">




<meta name="description" content="Using Page Templates" />
<meta property="og:description" content="Using Page Templates" />

<meta property="og:url" content="https://kubernetes.io/docs/home/contribute/page-templates/" />
<meta property="og:title" content="Using Page Templates - Kubernetes" />

<script
src="https://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous"></script>
<script
src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"
integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU="
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.js"></script>
<script src="../../../../js/script.js"></script>
<script src="../../../../js/custom-jekyll/tags.js"></script>


	</head>
	<body>
		<div id="cellophane" onclick="kub.toggleMenu()"></div>

<header>
    <a href="../../../../index.html" class="logo"></a>

    <div class="nav-buttons" data-auto-burger="primary">
        <ul class="global-nav">
            
            
            <li><a href="../../../home.1">Documentation</a></li>
            
            <li><a href="../../../../blog/index.html">Blog</a></li>
            
            <li><a href="../../../../partners/index.html">Partners</a></li>
            
            <li><a href="../../../../community/index.html">Community</a></li>
            
            <li><a href="../../../../case-studies/index.html">Case Studies</a></li>
            
            
             <li>
                <a href="index.html#">
                    English <span class="ui-icon ui-icon-carat-1-s"></span>
                </a>
                <ul>
                
                    <li><a href="../../../../zh/index.html">中文 Chinese</a></li>
                
                    <li><a href="../../../../ko/index.html">한국어 Korean</a></li>
                
                </ul>
            </li>
         
            <li>
                <a href="index.html#">
                    v1.11 <span class="ui-icon ui-icon-carat-1-s"></span>
                </a>
                <ul>
                
                    <li><a href="https://kubernetes.io">v1.12</a></li>
                
                    <li><a href="../../../../index.html">v1.11</a></li>
                
                    <li><a href="https://v1-10.docs.kubernetes.io">v1.10</a></li>
                
                    <li><a href="https://v1-9.docs.kubernetes.io">v1.9</a></li>
                
                </ul>
            </li>
        </ul>
        
        <a href="../../../tutorials/kubernetes-basics/index.html" class="button" id="tryKubernetes" data-auto-burger-exclude>Try Kubernetes</a>
        <button id="hamburger" onclick="kub.toggleMenu()" data-auto-burger-exclude><div></div></button>
    </div>

    <nav id="mainNav">
        <main data-auto-burger="primary">
        <div class="nav-box">
            <h3><a href="../../../tutorials/stateless-application/hello-minikube/index.html">Get Started</a></h3>
            <p>Ready to get your hands dirty? Build a simple Kubernetes cluster that runs "Hello World" for Node.js.</p>
        </div>
        <div class="nav-box">
            <h3><a href="../../../home.1">Documentation</a></h3>
            <p>Learn how to use Kubernetes with the use of walkthroughs, samples, and reference documentation. You can even <a href="../../../../editdocs/index.html" data-auto-burger-exclude>help contribute to the docs</a>!</p>
        </div>
        <div class="nav-box">
            <h3><a href="../../../../community/index.html">Community</a></h3>
            <p>If you need help, you can connect with other Kubernetes users and the Kubernetes authors, attend community events, and watch video presentations from around the web.</p>
        </div>
        <div class="nav-box">
            <h3><a href="../../../../blog/index.html">Blog</a></h3>
            <p>Read the latest news for Kubernetes and the containers space in general, and get technical how-tos hot off the presses.</p>
        </div>
        </main>
        <main data-auto-burger="primary">
        <div class="left">
            <h5 class="github-invite">Interested in hacking on the core Kubernetes code base?</h5>
            <a href="https://github.com/kubernetes/kubernetes" class="button" data-auto-burger-exclude>View On Github</a>
        </div>

        <div class="right">
            <h5 class="github-invite">Explore the community</h5>
            <div class="social">
                <a href="https://twitter.com/kubernetesio" class="twitter"><span>Twitter</span></a>
                <a href="https://github.com/kubernetes/kubernetes" class="github"><span>Github</span></a>
                <a href="http://slack.k8s.io/" class="slack"><span>Slack</span></a>
                <a href="http://stackoverflow.com/questions/tagged/kubernetes" class="stack-overflow"><span>Stack Overflow</span></a>
                <a href="https://discuss.kubernetes.io" class="mailing-list"><span>Forum</span></a>
                <a href="https://calendar.google.com/calendar/embed?src=nt2tcnbtbied3l6gi2h29slvc0%40group.calendar.google.com" class="calendar"><span>Events Calendar</span></a>
            </div>
        </div>
        <div class="clear" style="clear: both"></div>
        </main>
    </nav>
</header>

		
		
		<section id="hero" class="light-text no-sub">
			





<h1></h1>
<h5></h5>












<div id="vendorStrip" class="light-text">
	<ul>
		
		
		<li><a href="../../../home.1" class="YAH">DOCUMENTATION</a></li>
		
		
		<li><a href="../../../setup/index.html">SETUP</a></li>
		
		
		<li><a href="../../../concepts/index.html">CONCEPTS</a></li>
		
		
		<li><a href="../../../tasks/index.html">TASKS</a></li>
		
		
		<li><a href="../../../tutorials/index.html">TUTORIALS</a></li>
		
		
		<li><a href="../../../reference.1">REFERENCE</a></li>
		
	</ul>
	<div id="searchBox">
		<input type="text" id="search" placeholder="Search" onkeydown="if (event.keyCode==13) window.location.replace('/docs/search/?q=' + this.value)" autofocus="autofocus">
	</div>
</div>

		</section>
		
		
<section id="deprecationWarning">
  <main>
    <div class="content deprecation-warning">
      <h3>
        Documentation for Kubernetes v1.11 is no longer actively maintained. The version you are currently viewing is a static snapshot.
        For up-to-date documentation, see the <a href="https://kubernetes.io/docs/home/">latest</a> version.
      </h3>
    </div>
  </main>
</section>


		<section id="encyclopedia">
			
<div id="docsToc">
     <div class="pi-accordion">
    	
        
        
        
        
        
         
             
                 
                          
                          
                 
             
         
             
         
             
         
             
         
             
         
             
         
             
         
             
         
         
        
        <a class="item" data-title="Documentation" href="../../../home.1"></a>

	
	
		
		
	<div class="item" data-title="Contributing to the Kubernetes Docs">
		<div class="container">
		
		
	
	
		
		
<a class="item" data-title="Content Organization" href="../content-organization/index.html"></a>

		
	
		
		
<a class="item" data-title="Creating a Documentation Pull Request" href="../stage-documentation-changes/index.html"></a>

		
	
		
		
<a class="item" data-title="Custom Hugo Shortcodes" href="../includes.1"></a>

		
	
		
		
<a class="item" data-title="Documentation Style Guide" href="../style-guide.1"></a>

		
	
		
		
<a class="item" data-title="Generating Reference Documentation for Kubernetes Federation API" href="../generated-reference/federation-api/index.html"></a>

		
	
		
		
<a class="item" data-title="Generating Reference Documentation for kubectl Commands" href="../generated-reference/kubectl/index.html"></a>

		
	
		
		
<a class="item" data-title="Generating Reference Documentation for the Kubernetes API" href="../generated-reference/kubernetes-api/index.html"></a>

		
	
		
		
<a class="item" data-title="Generating Reference Pages for Kubernetes Components and Tools" href="../generated-reference/kubernetes-components/index.html"></a>

		
	
		
		
<a class="item" data-title="Localizing Kubernetes Documentation" href="../localization/index.html"></a>

		
	
		
		
<a class="item" data-title="Participating in SIG-DOCS" href="../participating/index.html"></a>

		
	
		
		
<a class="item" data-title="Reviewing Documentation Issues" href="../review-issues/index.html"></a>

		
	
		
		
<a class="item" data-title="Using Page Templates" href="index.html"></a>

		
	
		
		
<a class="item" data-title="Writing a Blog Post" href="../blog-post/index.html"></a>

		
	
		
		
<a class="item" data-title="Writing a New Topic" href="../write-new-topic/index.html"></a>

		
	

		</div>
	</div>

		
	
		
		
<a class="item" data-title="Supported Versions of the Kubernetes Documentation" href="../../supported-doc-versions/index.html"></a>

		
	






     </div> 
    <button class="push-menu-close-button" onclick="kub.toggleToc()"></button>
</div> 

			<div id="docsContent">
				
<p><a href="../../../editdocs#docs/home/contribute/page-templates.md" id="editPageButton">Edit This Page</a></p>

<h1>Using Page Templates</h1>



<nav id="TableOfContents">
<ul>
<li>
<ul>
<li><a href="index.html#title-configuring-this-thing">title: Configuring This Thing</a></li>
<li><a href="index.html#doing">Doing &hellip;</a></li>
<li><a href="index.html#understanding">Understanding &hellip;</a></li>
<li><a href="index.html#title-running-a-thing">title: Running a Thing</a></li>
<li><a href="index.html#building">Building &hellip;</a></li>
<li><a href="index.html#running">Running &hellip;</a></li>
<li><a href="index.html#understanding-the-code">Understanding the code</a></li>
<li><a href="index.html#title-understanding-this-thing">title: Understanding this Thing</a></li>
<li><a href="index.html#understanding-1">Understanding &hellip;</a></li>
<li><a href="index.html#using">Using &hellip;</a></li>
</ul></li>
</ul>
</nav>



<!--<html>
<body>-->

<p>These page templates are available for writers who would like to contribute new topics to the Kubernetes docs:</p>

<ul>
    <li><a href="index.html#task_template">Task</a></li>
    <li><a href="index.html#tutorial_template">Tutorial</a></li>
    <li><a href="index.html#concept_template">Concept</a></li>
</ul>

<p>The page templates are in the <a href="https://git.k8s.io/website/_includes/templates" target="_blank">_includes/templates</a> directory of the <a href="https://github.com/kubernetes/website">website</a> repository.

<h2 id="task_template">Task template</h2>

<p>A task page shows how to do a single thing, typically by giving a short
sequence of steps. Task pages have minimal explanation, but often provide links
to conceptual topics that provide related background and knowledge.</p>

<p>To write a new task page, create a Markdown file in a subdirectory of the
/docs/tasks directory. In your Markdown file, provide values for these
variables:</p>

<ul>
    <li>overview - required</li>
    <li>prerequisites - required</li>
    <li>steps - required</li>
    <li>discussion - optional</li>
    <li>whatsnext - optional</li>
</ul>

<p>Then include templates/task.md like this:</p>

<p>{% raw %}<pre>&hellip;
{% include templates/task.md %}</pre>{% endraw %}</p>

<p>In the <code>steps</code> section, use <code>##</code> to start with a level-two heading. For subheadings,
use <code>###</code> and <code>####</code> as needed. Similarly, if you choose to have a <code>discussion</code> section,
start the section with a level-two heading.</p>

<p>Here's an example of a Markdown file that uses the task template:</p>

<p>{% raw %}
<pre>&mdash;</p>

<h2 id="title-configuring-this-thing">title: Configuring This Thing</h2>

<p>{% capture overview %}
This page shows how to &hellip;
{% endcapture %}</p>

<p>{% capture prerequisites %}
* Do this.
* Do this too.
{% endcapture %}</p>

<p>{% capture steps %}</p>

<h2 id="doing">Doing &hellip;</h2>

<ol>
<li>Do this.</li>
<li>Do this next. Possibly read this <a href="https://v1-11.docs.kubernetes.io/docs/home/contribute/page-templates/..." target="_blank">related explanation</a>.
{% endcapture %}</li>
</ol>

<p>{% capture discussion %}</p>

<h2 id="understanding">Understanding &hellip;</h2>

<p>Here&rsquo;s an interesting thing to know about the steps you just did.
{% endcapture %}</p>

<p>{% capture whatsnext %}
* Learn more about <a href="https://v1-11.docs.kubernetes.io/docs/home/contribute/page-templates/..." target="_blank">this</a>.
* See this <a href="https://v1-11.docs.kubernetes.io/docs/home/contribute/page-templates/..." target="_blank">related task</a>.
{% endcapture %}</p>

<p>{% include templates/task.md %}</pre>
{% endraw %}</p>

<p>Here's an example of a published topic that uses the task template:</p>

<p><a href="../../../tasks/access-kubernetes-api/http-proxy-access-api.1">Using an HTTP Proxy to Access the Kubernetes API</a></p>

<h2 id="tutorial_template">Tutorial template</h2>

<p>A tutorial page shows how to accomplish a goal that is larger than a single
task. Typically a tutorial page has several sections, each of which has a
sequence of steps. For example, a tutorial might provide a walkthrough of a
code sample that illustrates a certain feature of Kubernetes. Tutorials can
include surface-level explanations, but should link to related concept topics
for deep explanations.

<p>To write a new tutorial page, create a Markdown file in a subdirectory of the
/docs/tutorials directory. In your Markdown file, provide values for these
variables:</p>

<ul>
    <li>overview - required</li>
    <li>prerequisites - required</li>
    <li>objectives - required</li>
    <li>lessoncontent - required</li>
    <li>cleanup - optional</li>
    <li>whatsnext - optional</li>
</ul>

<p>Then include templates/tutorial.md like this:</p>

<p>{% raw %}<pre>&hellip;
{% include templates/tutorial.md %}</pre>{% endraw %}</p>

<p>In the <code>lessoncontent</code> section, use <code>##</code> to start with a level-two heading. For subheadings,
use <code>###</code> and <code>####</code> as needed.

<p>Here's an example of a Markdown file that uses the tutorial template:</p>

<p>{% raw %}
<pre>&mdash;</p>

<h2 id="title-running-a-thing">title: Running a Thing</h2>

<p>{% capture overview %}
This page shows how to &hellip;
{% endcapture %}</p>

<p>{% capture prerequisites %}
* Do this.
* Do this too.
{% endcapture %}</p>

<p>{% capture objectives %}
* Learn this.
* Build this.
* Run this.
{% endcapture %}</p>

<p>{% capture lessoncontent %}</p>

<h2 id="building">Building &hellip;</h2>

<ol>
<li>Do this.</li>
<li>Do this next. Possibly read this <a href="https://v1-11.docs.kubernetes.io/docs/home/contribute/page-templates/..." target="_blank">related explanation</a>.</li>
</ol>

<h2 id="running">Running &hellip;</h2>

<ol>
<li>Do this.</li>
<li>Do this next.</li>
</ol>

<h2 id="understanding-the-code">Understanding the code</h2>

<p>Here&rsquo;s something interesting about the code you ran in the preceding steps.
{% endcapture %}</p>

<p>{% capture cleanup %}
* Delete this.
* Stop this.
{% endcapture %}</p>

<p>{% capture whatsnext %}
* Learn more about <a href="https://v1-11.docs.kubernetes.io/docs/home/contribute/page-templates/..." target="_blank">this</a>.
* See this <a href="https://v1-11.docs.kubernetes.io/docs/home/contribute/page-templates/..." target="_blank">related tutorial</a>.
{% endcapture %}</p>

<p>{% include templates/tutorial.md %}</pre>
{% endraw %}</p>

<p>Here's an example of a published topic that uses the tutorial template:</p>

<p><a href="../../../tutorials/stateless-application/run-stateless-application-deployment/index.html">Running a Stateless Application Using a Deployment</a></p>

<h2 id="concept_template">Concept template</h2>

<p>A concept page explains some aspect of Kubernetes. For example, a concept
page might describe the Kubernetes Deployment object and explain the role it
plays as an application is deployed, scaled, and updated. Typically, concept
pages don't include sequences of steps, but instead provide links to tasks or
tutorials.

<p>To write a new concept page, create a Markdown file in a subdirectory of the
/docs/concepts directory. In your Markdown file,  provide values for these
variables:</p>

<ul>
    <li>overview - required</li>
    <li>body - required</li>
    <li>whatsnext - optional</li>
</ul>

<p>Then include templates/concept.md like this:</p>

<p>{% raw %}<pre>&hellip;
{% include templates/concept.md %}</pre>{% endraw %}</p>

<p>In the <code>body</code> section, use <code>##</code> to start with a level-two heading. For subheadings,
use <code>###</code> and <code>####</code> as needed.

<p>Here's an example of a page that uses the concept template:</p>

<p>{% raw %}
<pre>&mdash;</p>

<h2 id="title-understanding-this-thing">title: Understanding this Thing</h2>

<p>{% capture overview %}
This page explains &hellip;
{% endcapture %}</p>

<p>{% capture body %}</p>

<h2 id="understanding-1">Understanding &hellip;</h2>

<p>Kubernetes provides &hellip;</p>

<h2 id="using">Using &hellip;</h2>

<p>To use &hellip;
{% endcapture %}</p>

<p>{% capture whatsnext %}
* Learn more about <a href="https://v1-11.docs.kubernetes.io/docs/home/contribute/page-templates/..." target="_blank">this</a>.
* See this <a href="https://v1-11.docs.kubernetes.io/docs/home/contribute/page-templates/..." target="_blank">related task</a>.
{% endcapture %}</p>

<p>{% include templates/concept.md %}</pre>
{% endraw %}</p>

<p>Here's an example of a published topic that uses the concept template:</p>

<p><a href="../../../concepts/overview/working-with-objects/annotations.1">Annotations</a></p>

<!--</body>
</html>-->



				<div class="issue-button-container">
					<p><a href="index.html"><img src="https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/home/contribute/page-templates.md?pixel" alt="Analytics" /></a></p>
					
					
					<script type="text/javascript">
					PDRTJS_settings_8345992 = {
					"id" : "8345992",
					"unique_id" : "\/docs\/home\/contribute\/page-templates\/",
					"title" : "Using Page Templates",
					"permalink" : "https:\/\/kubernetes.io\/docs\/home\/contribute\/page-templates\/"
					};
					(function(d,c,j){if(!document.getElementById(j)){var pd=d.createElement(c),s;pd.id=j;pd.src=('https:'==document.location.protocol)?'https://polldaddy.com/js/rating/rating.js':'http://i0.poll.fm/js/rating/rating.js';s=document.getElementsByTagName(c)[0];s.parentNode.insertBefore(pd,s);}}(document,'script','pd-rating-js'));
					</script>
					<a href="index.html" onclick="window.open('https://github.com/kubernetes/website/issues/new?title=Issue%20with%20' +
					'k8s.io'+window.location.pathname)" class="button issue">Create an Issue</a>
					
					
					
					<a href="../../../editdocs#docs/home/contribute/page-templates.md" class="button issue">Edit this Page</a>
					
				</div>
			</div>
		</section>
		<footer>
    <main class="light-text">
        <nav>
            
            
            
            <a href="../../../home.1">Documentation</a>
            
            <a href="../../../../blog/index.html">Blog</a>
            
            <a href="../../../../partners/index.html">Partners</a>
            
            <a href="../../../../community/index.html">Community</a>
            
            <a href="../../../../case-studies/index.html">Case Studies</a>
            
        </nav>
        <div class="social">
            <div>
                <a href="https://twitter.com/kubernetesio" class="twitter"><span>twitter</span></a>
                <a href="https://github.com/kubernetes/kubernetes" class="github"><span>Github</span></a>
                <a href="http://slack.k8s.io/" class="slack"><span>Slack</span></a>
            </div>
            <div>
                <a href="http://stackoverflow.com/questions/tagged/kubernetes" class="stack-overflow"><span>Stack Overflow</span></a>
                <a href="https://discuss.kubernetes.io" class="mailing-list"><span>Forum</span></a>
                <a href="https://calendar.google.com/calendar/embed?src=nt2tcnbtbied3l6gi2h29slvc0%40group.calendar.google.com" class="calendar"><span>Events Calendar</span></a>
            </div>
            <div>
                <a href="../../../getting-started-guides/index.html" class="button">Get Kubernetes</a>
                <a href="https://git.k8s.io/community/contributors/guide" class="button">Contribute</a>
            </div>
        </div>
        <div id="miceType" class="center">
            &copy; 2018 The Kubernetes Authors | Documentation Distributed under <a href="https://git.k8s.io/website/LICENSE" class="light-text">CC BY 4.0</a>
        </div>
        <div id="miceType" class="center">
            Copyright &copy; 2018 The Linux Foundation&reg;. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our <a href="https://www.linuxfoundation.org/trademark-usage" class="light-text">Trademark Usage page</a>
        </div>
    </main>
</footer>

		<button class="flyout-button" onclick="kub.toggleToc()"></button>

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-36037335-10', 'auto');
ga('send', 'pageview');


(function () {
    window.addEventListener('DOMContentLoaded', init)

        
        function init() {
            window.removeEventListener('DOMContentLoaded', init)
                hideNav()
        }

    function hideNav(toc){
        if (!toc) toc = document.querySelector('#docsToc')
        if (!toc) return
            var container = toc.querySelector('.container')

                
                if (container) {
                    if (container.childElementCount === 0 || toc.querySelectorAll('a.item').length === 1) {
                        toc.style.display = 'none'
                            document.getElementById('docsContent').style.width = '100%'
                    }
                } else {
                    requestAnimationFrame(function () {
                        hideNav(toc)
                    })
                }
    }
})();
</script>



	</body>
</html>